﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>开关灯2</title>
    <style>
        a{
            color: #c01900;
            text-decoration: none;
        }
    </style>
</head>
<body>
<a href="开关灯3.html">开关灯3</a>
<br/>
<br/>
<img src="pic_bulboff.gif" height="180" width="100" onclick="kaiDeng()" id="deng"/>
<script>
    var liang=false;
   function kaiDeng() {
    if (liang){
        deng.src="pic_bulboff.gif";
        liang=false;
    }else {
        deng.src="pic_bulbon.gif";
        liang=true;
    }
   }
</script>
<script>
    var score =prompt("请输入你的成绩");

    if(score>=90){
        alert("优秀");
    }else if(score>=80){
        alert("良好");
    }else if(score>=60){
        alert("及格");
    }else{
        alert("不及格");
    }
</script>

</body>
</html>